{template '_header'}


<div class="page-heading"> 
	
	<span class='pull-right'>
		
		{ifp 'shop.verify.saler.add'}
                            <a class="btn btn-primary btn-sm" href="{php echo merchUrl('shop/verify/saler/add')}">添加新店员</a>
		{/if}
                
		<a class="btn btn-default  btn-sm" href="{php echo merchUrl('shop/verify/saler')}">返回列表</a>
                
                
	</span>
	<h2>{if !empty($item['id'])}编辑{else}添加{/if}店员 <small>{if !empty($item['id'])}修改【{$item['salername']}】{/if}</small></h2> 
</div>

    <form {ife 'shop.verify.saler' $item}action="" method="post"{/if} class="form-horizontal form-validate" enctype="multipart/form-data">
        <input type="hidden" name="id" value="{$item['id']}" />
 
               
                <div class="form-group">
                    <label class="col-sm-2 control-label must">选择会员</label>
                    <div class="col-sm-9 col-xs-12">
                        {ife 'shop.verify.saler' $item}
                           {php echo tpl_selector('openid',array('key'=>'openid', 'required'=>true, 'text'=>'nickname', 'thumb'=>'avatar','placeholder'=>'昵称/姓名/手机号','buttontext'=>'选择会员 ', 'items'=>$saler,'url'=>merchUrl('member/query') ))}
                        {else}
                             {if !empty($saler)}
                             <span class='help-block'><img  style="width:100px;height:100px;border:1px solid #ccc;padding:1px" src="{$saler['avatar']}"/><br/>
                                 {if !empty($saler)}{$saler['nickname']}/{$saler['realname']}/{$saler['mobile']}{/if}</span>
                            {/if}
                        {/if}
                    </div>
                </div>
				
				  
                <div class="form-group">
                    <label class="col-sm-2 control-label must">店员姓名</label>
                    <div class="col-sm-9 col-xs-12">
                        {ife 'shop.verify.saler' $item}
                        <input type="text" name="salername" class="form-control" value="{$item['salername']}" data-rule-required='true'/>
                        {else}
                        <div class='form-control-static'>{$item['salername']}</div>
                        {/if}
                    </div>
                </div>
					   
                 <div class="form-group">
                    <label class="col-sm-2 control-label">所属门店</label>
                    <div class="col-sm-9 col-xs-12">
                            {ife 'shop.verify.saler' $item}
                          {php echo tpl_selector('storeid',array('text'=>'storename','preview'=>true,'type'=>'text',  'thumb'=>'avatar','placeholder'=>'门店名称','buttontext'=>'选择门店 ', 'items'=>$store,'url'=>merchUrl('shop/verify/store/query')))}
						  <span class='help-block'>如果不选择门店，则可以进行全门店的核销</span>
                        {else}
                           <div class='form-control-static'>{if empty($store['storename'])}全店核销{else}{$store['storename']}{/if}</div>
                        {/if}
                    </div>
                </div>
                
                <div class="form-group">
                    <label class="col-sm-2 control-label">状态</label>
                    <div class="col-sm-9 col-xs-12">
                             {ife 'shop.verify.saler' $item}
                        <label class='radio-inline'>
                            <input type='radio' name='status' value=1' {if $item['status']==1}checked{/if} /> 启用
                        </label>
                        <label class='radio-inline'>
                            <input type='radio' name='status' value=0' {if $item['status']==0}checked{/if} /> 禁用
                        </label>
                             {else}
                              <div class='form-control-static'>{if $item['status']==1}启用{else}禁用{/if}</div>
                             {/if}
                    </div>
                </div>
                
           <div class="form-group"></div>
            <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                           {ife 'shop.verify.saler' $item}
                            <input type="submit" value="提交" class="btn btn-primary"  />
                            
                        {/if}
                       <input type="button" name="back" onclick='history.back()' {ifp 'shop.verify.saler.add|shop.verify.saler.edit'}style='margin-left:10px;'{/if} value="返回列表" class="btn btn-default" />
                    </div>
            </div>
    </form>
 
{template '_footer'}
 